package com.ylx.code.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ylx.code.bo.LoginBo;
import com.ylx.code.enums.CommonEnum;
import com.ylx.code.exception.ServiceException;
import com.ylx.code.mapper.MarkAccountMapper;
import com.ylx.code.model.MarkAccount;
import com.ylx.code.service.MarkAccountService;
import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.Objects;

/**
 * ClassName: MarkAccountServiceImpl <br/>
 * Description: <br/>
 * date: 2023/11/17 16:00<br/>
 *
 * @author yanglixin<br />
 */
@Service
public class MarkAccountServiceImpl extends ServiceImpl<MarkAccountMapper, MarkAccount> implements MarkAccountService {

    @Override
    public Map<String, Object> login(LoginBo bo) {
        LambdaQueryWrapper<MarkAccount> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(MarkAccount::getLoginName,bo.getLoginName());
        wrapper.eq(MarkAccount::getIsDeleted, CommonEnum.UN_DELETE.getValue());
        MarkAccount markAccount = this.getOne(wrapper);
        if (Objects.nonNull(markAccount)) {
            throw new ServiceException("");
        }
        return null;
    }
}
